1. Field of the Invention
Aspects of the present invention relate to a web server and a web service method thereof, and more particularly, to a web server and a web service method thereof that compress and provide a requested web resource.
2. Related Art
The Internet has experienced massive growth in recent years. The emergence of the World Wide Web has enabled millions of Internet users throughout the world to easily download web pages containing text, graphics, video, and/or sound data via host computers or wireless devices at home, work, or from remote locations. These web pages are often large in size. As a result, a long period of time is required to download these web pages, causing the user delay and frustration. Often times, users have to abandon the requested web page due to the delay and move on to other web pages, resulting in lost revenue and exposure for many commercial web sites.
The delay in downloading a web page may be caused by a number of factors. On a server side, a large volume of page requests may overload the capacity of the server and result in unanswered requests or late answers to requests. Within a computer network, network congestion and limited bandwidth may cause delay in the transmission of data. Particularly, an embedded web server that is mounted on a small network device performs poorly as compared to a web server developed for a general computer, such as a personal computer or a workstation.
FIG. 1 is a view of a typical network data transmission system. In particular, FIG. 1 illustrates a network data transmission system and a method thereof described in U.S. Pat. No. 6,834,297. As shown in FIG. 1, the network data transmission system 10 described has one or more specified machines 12 positioned in front of web servers 11 and accessed by client terminals 13, via a network such as a wide area network (WAN) 14. A managing server 15 is also included to enable an administrator (i.e., network manager) to manage the network data transmission system 10. Each machine 12 serves as a proxy of the web servers 11, and performs a load balancing, downloading of a resource from the web server 11, compressing of content, and so forth. In this case, the speed of communications with the respective web server 11 is increased by using a protocol of a lower level than a transmission control protocol (TCP). Particularly, in the case of providing the web resource, the machine 12 compresses an image (or the like), and then changes the image (or the like) uniform resource locator (URL) in the generic tag markup language (GTML) to a compressed one in order to provide the compressed image URL. When the browser performs a rendering, the hypertext markup language (HTML) removes various kinds of tags, attributes of the tags, and various kinds of annotations that are unnecessary.
In the system disclosed in U.S. Pat. No. 6,834,297, the web server 11 mainly compresses the HTML and does not compress JavaScript. In the case where JavaScript is used (such as when the page has a dynamic user interface), the size of the JavaScript code is generally larger than that of the HTML code. However, the system disclosed in U.S. Pat. No. 6,834,297 has a problem in that it does not compress the JavaScript. In addition, since the compression of content is not the role of the web server 11 but is performed by another server in the web server stage, it is difficult to apply the system to the embedded device.